import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'Index',
    component: () => import('@/views/Index.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/Login.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('@/views/Register.vue')
  },
  {
    path: '/courseList',
    name: 'CourseList',
    component: () => import('@/views/CourseList.vue')
  },
  {
    path: '/courseDetail/:id',
    name: 'courseDetail',
    component: () => import('@/views/CourseDetail.vue')
  },
  {
    path: '/order/:id',
    name: 'order',
    component: () => import('@/views/Order.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
